﻿@{
    ViewBag.Title = "仓库寻租";
}
<div class="dialog red" id="partnerjoin" style="">
    <div class="dialog-content">
        <form>
            <div class="see-warehose-box" style="padding-bottom:18px;">
                <p class="sw-cue">请留下您的电话，我们将尽快联系您！</p>
                <ul class="sw-input">
                    <li style="width:42%;">
                        <span class="title"><i>*</i>联系人：</span>
                        <div class="box">
                            <input class="from-input1" name="ContactName" type="text" value="">
                        </div>
                    </li>
                    <li style="width:58%;">
                        <span class="title"><i>*</i>联系电话：</span>
                        <div class="box">
                            <input class="from-input1" name="PhoneNo" type="text" value="">
                        </div>
                    </li>
                    <li class="all">
                        <span class="title">备&nbsp;&nbsp;&nbsp;&nbsp;注：</span>
                        <div class="box">
                            <p><textarea class="from-input" name="Remarks" cols="20" placeholder="可录入您对仓库的要求、方便看仓时间等信息" rows="2"></textarea></p>
                        </div>
                    </li>
                    <li class="all">
                        <span class="title"></span>
                        <div class="box xy">
                            <p>
                                <input checked="checked" type="checkbox" value="true">同意
                                <a href="javascript:void(0);">《中储恒科会员服务协议》</a>
                            </p>
                        </div>
                    </li>
                    <li class="all">
                        <div class="box btn-box">
                            <input type="button" id="btn" class="btn-submit" value="提交">
                        </div>
                    </li>
                </ul>
            </div>
        </form>
    </div>
    <div class="dialog-footer">
        <p class="tel"><b>或者您可以直接拨打电话预约：</b><span class="blue"><u class="yc icon-tel"></u><b>123456789</b></span></p>
    </div>
</div>
<script>
    $(function () {
        $("#btn").click(function () {
            var formdata = {};
            $.each($('form').serializeArray(), function () {
                formdata[this.name] = this.value;
            });
            if (formdata.ContactName == "" || formdata.PhoneNo == "") {
                layer.msg("联系人和手机号码不能为空！");
                return;
            }
            $.ajax({
                type: "post",
                url: "/Client/Default/ContactUs",
                contentType: "application/json; charset=utf-8",
                cache: false,
                async: false,
                data: JSON.stringify(formdata), //转换成json数据
                success: function (res) {
                    layer.alert(res.msg, function (index) {
                        layer.close(index);
                        if (res.count > 0) {
                            parent.layer.closeAll();
                        }
                    })
                }
            });
        })
    })
</script>